﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crosland.Automotriz.Seguridad.Entity;
namespace Crosland.Automotriz.Seguridad.DataAccess
{
    public class clsT_Seg_Historial_Log_DetDAO
    {


        Automotriz_TesisEntities bd = new Automotriz_TesisEntities();

        public bool Insertar(T_SEG_HISTORIAL_LOG_DET Obj)
        {
            try
            {
                bd.AddObject("T_SEG_HISTORIAL_LOG_DET", Obj);
                bd.SaveChanges();
            }
            catch (Exception)
            {
                return false;
            }
            return true;
        }



        public int UltimoNumeroLog_historial_det()
        {
            int max = 0;

            try
            {
                max = bd.T_SEG_HISTORIAL_LOG_DET.Select(x => x.ID_SEG_HISTORIAL_LOG_DET).Max();


            }
            catch (Exception)
            {
                return max;
            }

            return max;

        }

    }
}
